#include <stdio.h>
#include <unistd.h>
#include <signal.h>
int count=0;
void handler(int sig)
{
    alarm(1);
    printf("signal:%d,count:%d\n",sig,count);
}
int main(void)
{
    signal(SIGALRM,handler);
    alarm(1);
    while(1)
    {
        count++;
    }
    return 0;
}
